package com.yunhe.java.day08.JiCheng.work;

/**
 * Created by Administrator on 2017/7/31 0031.
 */
public class Student extends Person{
    public Student(){
        super(60);

    }
    //super关键字 不能用在static修饰的类中
    //用来访问父类中同名被覆盖的实例变量
    public  void  Superweight(){
        int b= super.weight;
        System.out.println(b);
        super.fun();
        System.out.println(super.weight);
    }
    //子类方法的重写
    public void fun()
    {
        System.out.println("学生在跑步");
    }
}








